package com.gupaoedu.vip;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * <p>
 *
 * </p>
 *
 * @author Nicky
 * @since 2019-10-05
 */
public class RpcProxyServer {

  ExecutorService executorService = Executors.newCachedThreadPool();


//  public void publisher(int port,Object service){
//    ServerSocket serverSocket = null;
//
//    try {
//      serverSocket = new ServerSocket(port); //BIO模型
//      //不断接受请求
//      while (true){
//        Socket socket = serverSocket.accept();
//        executorService.execute(new ProcesserHander(socket,service));
//
//      }
//    } catch (IOException e) {
//      e.printStackTrace();
//    }
//    finally {
//      if(serverSocket != null){
//        try {
//          serverSocket.close();
//        } catch (IOException e) {
//          e.printStackTrace();
//        }
//      }
//    }
//  }
}
